Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
rereadable-stream
Advanced tools
A simple standards-based stream that can be read again from begining.
The module exposes a Writable stream that you can replay at any given moment to any number of Writable outputs. Think of it as a DVR feature for Node.js streams - one stream can start playing, but others may want to join in at any given point in time and start reading from the begining.
Usage:
const {ReReadable} = require("rereadable-stream");
let rereadable = fs.createReadStream("myfile")
.pipe(new ReReadable(options));
srv.on("connection", (sock) => sock.pipe(rereadable.rewind()));
The module exposes a simple API on as an extension a standard Writable stream:
The options are:
If one of readable stream cannot cope with the speed of other streams drop
events will be emitted to inform about it.
rewound.on("drop", (count) => console.log(`dropped ${count} items`));
Notice: For version 1.0.0 only object streams are well tested. There's no reason why buffer stream should not work, but they won't follow any sensible limits. This will be fixed in 1.2.0.
See LICENSE (MIT).
For other licensing options please open an issue or contact the author at opensource (at) signicode.com
FAQs
A simple standards-based stream that can be read again from begining.
The npm package rereadable-stream receives a total of 13,277 weekly downloads. As such, rereadable-stream popularity was classified as popular.
We found that rereadable-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.